<!DOCTYPE html>
<html lang="{{ @this->lang() }}">
<head>
    <include href="blocks/head.html" />
</head>
<body>
<include href="blocks/navbar.html" />
<div class="container">
    <include href="blocks/admin/tabs.html" />
    <form action="{{ @BASE }}/admin/sprints/{{@sprint.id}}" method="post" class="form-horizontal" autocomplete="off">
        <csrf-token />
        <legend>{{ @dict.edit_sprint }}</legend>
        <div class="form-group">
            <label for="name" class="col-md-2 control-label label-sm">{{ @dict.name }}</label>
            <div class="col-md-10">
                <input class="form-control input-sm" id="name" type="text" name="name" value="{{ @sprint.name | esc }}">
            </div>
        </div>
        <div class="form-group">
            <label for="start_date" class="col-md-2 control-label label-sm">{{ @dict.start_date }}</label>
            <div class="col-md-4">
                <input class="form-control input-sm" id="start_date" type="text" name="start_date" value="{{ @sprint.start_date | esc }}" required>
            </div>
        </div>
        <div class="form-group">
            <label for="end_date" class="col-md-2 control-label label-sm">{{ @dict.end_date }}</label>
            <div class="col-md-4">
                <input class="form-control input-sm" id="end_date" type="text" name="end_date" value="{{ @sprint.end_date | esc }}" required>
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-10 col-md-offset-2">
                <button type="submit" class="btn btn-primary btn-sm">{{ @dict.save }}</button>
                <a href="{{ @BASE }}/admin/sprints" class="btn btn-default btn-sm">{{ @dict.cancel }}</a>
            </div>
        </div>
    </form>
    <include href="blocks/footer.html" />
</div>
<script src="{{ @BASE }}/js/bootstrap-datepicker.js"></script>
<check if="{{ @user_obj->date_picker()->js && @user_obj->date_picker()->language != 'en-US' }}">
<script src="{{ @BASE }}/js/bootstrap-datepicker.{{ @user_obj->date_picker()->language }}.min.js"></script>
</check>
<script>
    $(function() {
        $('#start_date, #end_date').datepicker({
            format: 'yyyy-mm-dd',
            language: '{{ @user_obj->date_picker()->language }}',
            todayHighlight: true,
            autoclose: true
        });
    });
</script>
</body>
</html>
